import request from '@/utils/request'

// 查询库存统计列表
export function listStatistics(query) {
    return request({
        url: '/system/statistics/list',
        method: 'get',
        params: query
    })
}

// 查询库存统计详细
export function getStatistics(id) {
    return request({
        url: '/system/statistics/' + id,
        method: 'get'
    })
}

// 新增库存统计
export function addStatistics(data) {
    return request({
        url: '/system/statistics',
        method: 'post',
        data: data
    })
}

// 修改库存统计
export function updateStatistics(data) {
    return request({
        url: '/system/statistics',
        method: 'put',
        data: data
    })
}

// 删除库存统计
export function delStatistics(id) {
    return request({
        url: '/system/statistics/' + id,
        method: 'delete'
    })
}

// 导出库存统计
export function exportStatistics(query) {
    return request({
        url: '/system/statistics/export',
        method: 'get',
        params: query
    })
}

// 查询库存趋势
export function getStockTrend(query) {
    return request({
        url: '/system/statistics/trend',
        method: 'get',
        params: query
    })
}

// 查询库存分析
export function getStockAnalysis(query) {
    return request({
        url: '/system/statistics/analysis',
        method: 'get',
        params: query
    })
}

// 查询库存报表
export function getStockReport(query) {
    return request({
        url: '/system/statistics/report',
        method: 'get',
        params: query
    })
}